package cn.ultrarisk.scadmin.manager.biz.zookeeper.entity;

import cn.ultrarisk.mybatis.extension.annotation.Table;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * zk备份实体类
 *
 * @author sevendlong(lin23871@163.com)
 * @date 2014/4/14
 * @since V1.0
 */
@Table(table = "zk_backup", idColumn = ZkBackup.ID, autoIncrement = true)
public class ZkBackup implements Serializable {
    private static final long serialVersionUID = -4771670596324561817L;

    /**
     * 自动备份
     */
    public static final int TYPE_AUTO = 1;
    /**
     * 手动备份
     */
    public static final int TYPE_MAN = 2;

    public final static String ID = "id";
    public final static String TYPE = "type";
    public final static String PATH = "path";
    public final static String REMARK = "remark";
    public final static String CREATE_TIME = "create_time";

    public static final Map<String, String> COLUMN_PROPERTY_MAP = new LinkedHashMap<String, String>();

    static {
        COLUMN_PROPERTY_MAP.put(ID, "id");
        COLUMN_PROPERTY_MAP.put(TYPE, "type");
        COLUMN_PROPERTY_MAP.put(PATH, "path");
        COLUMN_PROPERTY_MAP.put(REMARK, "remark");
        COLUMN_PROPERTY_MAP.put(CREATE_TIME, "createTime");
    }

    /**
     * 编号
     */
    private Integer id;
    /**
     * 类型
     */
    private Integer type;
    /**
     * 备份路径
     */
    private String path;
    /**
     * 描述
     */
    private String remark;
    /**
     * 创建时间
     */
    private Long createTime;

    private List<ZkNode> nodes;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public List<ZkNode> getNodes() {
        return nodes;
    }

    public void setNodes(List<ZkNode> nodes) {
        this.nodes = nodes;
    }
}